import { lazy } from 'react'
import { Modal } from '@/desktop/components'
import { Suspense } from '@/desktop/components/Loading'

const Content = lazy(async () => import('./Content'))

export { ReactComponent as Icon } from './icon.svg'

export function NewRank({ open, onClose }: { open: boolean; onClose: () => void }) {
  return <Modal title="新榜公众号数据" footer={null} width="650px" open={open} onCancel={onClose}>
    {open ? (
      <Suspense>
        <Content onClose={onClose} />
      </Suspense>
    ) : null}
  </Modal>
}
